package com.onpositive.page.core;

import java.util.Arrays;
import java.util.Collections;

public class GenericSiteInfo implements IGenericSiteInfo {

	NamedLink copyRight;
	NamedLink header;
	String title;
	String description;
	Iterable<NamedLink> topLevelMenu = Collections.emptyList();
	ITheme theme;

	public GenericSiteInfo(String title, NamedLink copyRight, NamedLink header,String description) {
		super();
		this.copyRight = copyRight;
		this.header = header;
		this.title = title;
		this.description=description;
	}

	
	public NamedLink getCopyright() {
		return copyRight;
	}

	
	public NamedLink getSecondHeader() {
		return header;
	}

	
	public String getTitle() {
		return title;
	}

	
	public Iterable<NamedLink> getTopLevelMenu() {
		return topLevelMenu;
	}

	public void setTopLevelMenu(Iterable<NamedLink> topLevelMenu) {
		this.topLevelMenu = topLevelMenu;
	}

	public void setTopLevelMenu(NamedLink... topLevelMenu) {
		this.topLevelMenu = Arrays.asList(topLevelMenu);
	}

	public NamedLink createRelativeLink(String string, String string2) {
		return new NamedLink(getSecondHeader().url + '/' + string, string2);
	}

	public void setTheme(ITheme theme) {
		this.theme = theme;
	}

	public ITheme getTheme() {
		return theme;
	}

	public String getDescription() {
		return description;
	}
}
